/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bionic.jdbc.connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author FIRST
 */
public class DAOFactory {

    public static final String DRIVER = "com.mysql.jdbc.Driver";
    public static final String DB_URL = "jdbc:mysql://localhost:3306";
    public static final String DB_USER = "root";
    public static final String DB_PASS = "root";

    public static Connection createConnection() throws SQLException {

        try {
            Class theDriver = Class.forName(DRIVER);

        } catch (ClassNotFoundException e) {
            System.err.println("Драйвер JDBC не найден");
        }

        Connection myConnection = DriverManager.getConnection(DB_URL, DB_USER, DB_PASS);

        return myConnection;
    }

    public DAOFactory() {
    }

}
